package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.pojo.entity.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* @author 妖妖零
* @description 针对表【sys_user_role(用户和角色关联表)】的数据库操作Mapper
* @createDate 2024-05-06 20:44:44
* @Entity org.example.pojo.entity.SysUserRole
*/

@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
        @Select("SELECT * FROM sys_user_role WHERE user_id = #{userId} AND role_id = #{roleId}")
        SysUserRole getByUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);
    }





